package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import java.util.Date;
import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.BookingsDatetimeExample.E_BOOKINGS_DATETIME;
import static org.jsola.hr.example.BookingsDatetimeExample.E_BOOKINGS_DATETIME_COUNT;
import static org.jsola.hr.example.BookingsDatetimeExample.E_BOOKINGS_DATETIME_REMAINING_COUNT;
import static org.jsola.hr.example.BookingsDatetimeExample.E_BOOKINGS_DAY;
import static org.jsola.hr.example.BookingsDatetimeExample.E_BUSINESS_ID;
import static org.jsola.hr.example.BookingsDatetimeExample.M_BOOKINGS_DATETIME_COUNT_NOT_NULL;
import static org.jsola.hr.example.BookingsDatetimeExample.M_BOOKINGS_DATETIME_MAX;
import static org.jsola.hr.example.BookingsDatetimeExample.M_BOOKINGS_DATETIME_NOT_NULL;
import static org.jsola.hr.example.BookingsDatetimeExample.M_BOOKINGS_DAY_NOT_NULL;
import static org.jsola.hr.example.BookingsDatetimeExample.M_BUSINESS_ID_NOT_NULL;
import static org.jsola.hr.example.BookingsDatetimeExample.N_BOOKINGS_DATETIME;
import static org.jsola.hr.example.BookingsDatetimeExample.N_BOOKINGS_DATETIME_COUNT;
import static org.jsola.hr.example.BookingsDatetimeExample.N_BOOKINGS_DATETIME_REMAINING_COUNT;
import static org.jsola.hr.example.BookingsDatetimeExample.N_BOOKINGS_DAY;
import static org.jsola.hr.example.BookingsDatetimeExample.N_BUSINESS_ID;

/**
 * 预约业务时段表
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【预约业务时段表】的参数")
@Data
public class BookingsDatetimeUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private Long id;

    @ApiModelProperty(notes = N_BOOKINGS_DATETIME_REMAINING_COUNT, example = E_BOOKINGS_DATETIME_REMAINING_COUNT)
    private Integer bookingsDatetimeRemainingCount;

    @ApiModelProperty(notes = N_BOOKINGS_DAY, example = E_BOOKINGS_DAY, required = true)
    @NotNull(message = M_BOOKINGS_DAY_NOT_NULL)
    private Date bookingsDay;

    @ApiModelProperty(notes = N_BOOKINGS_DATETIME, example = E_BOOKINGS_DATETIME, required = true)
    @NotNull(message = M_BOOKINGS_DATETIME_NOT_NULL)
    @Length(max = 50, message = M_BOOKINGS_DATETIME_MAX)
    private String bookingsDatetime;

    @ApiModelProperty(notes = N_BOOKINGS_DATETIME_COUNT, example = E_BOOKINGS_DATETIME_COUNT, required = true)
    @NotNull(message = M_BOOKINGS_DATETIME_COUNT_NOT_NULL)
    private Integer bookingsDatetimeCount;

    @ApiModelProperty(notes = N_BUSINESS_ID, example = E_BUSINESS_ID, required = true)
    @NotNull(message = M_BUSINESS_ID_NOT_NULL)
    private Long businessId;


}

